{% extends "blogs/base.html" %}

{% block blogcontent %}
    {% if posts %}
        {% for post in posts %}
            <div class="post{% if forloop.last %} last{% endif %}">
                {% include 'blogs/post_template.html' %}
            </div>
        {% endfor %}
        <p id="post_nav"> 
            {% if has_next_page %}<a href="{{ older_url }}">&laquo; Older posts</a>{% endif %}
            {% if has_previous_page %}{% if has_next_page %}| {% endif %}<a href="{{ newer_url }}">Newer posts &raquo;</a>{% endif %}
        </p>
    {% else %}
        <p>There are no posts for this blog. Please check back later.</p>
    {% endif %}
{% endblock %}
